package com.csxh.web.service.eshop;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.csxh.web.dao.IDao;
import com.csxh.web.dao.eshop.ShippingDao;
import com.csxh.web.mapper.eshop.ShippingMapper;
import com.csxh.web.model.eshop.Shipping;
import com.csxh.web.service.PagerService;

@Service
public class ShippingService extends PagerService<Shipping> {

	private ShippingDao thisDao;
	
	@Autowired
	public void setDao(IDao<Shipping> dao) {
		this.thisDao=(ShippingDao)dao;
		super.setDao(dao);
	}
	
	public List<Shipping> findAll(){

		SqlSession session =this.thisDao.getSessionFactory().openSession();
		ShippingMapper mapper = session.getMapper(ShippingMapper.class);
		List<Shipping> list = mapper.selectAll();
		
		return list;
		
	}

}
